<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/views/inc/taglib.inc" %>
<%@ taglib uri="http://jakarta.apache.org/taglibs/string-1.1" prefix="str" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>登陆</title>
</head>
<body>
<%@include file="/views/inc/msgbox.inc" %>

<str:encodeUrl>请先登录～～</str:encodeUrl>
<%=request.getParameter("errorMsg") %>
<%=request.getCharacterEncoding() %>
<str:decodeUrl><%=request.getParameter("errorMsg") %></str:decodeUrl>
<form action="">
用户名：<input  type="text" name="userName" id="userName" class="userName">
密码：  <input   type="password"name="passWord" id="passWord" class="passWord">
<input type="button" class="loginIn" value="登陆">
<a href="register">注册</a>
</form>
login
<script type="text/javascript" src="views/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
  $(function(){
  $(".loginIn").click(function()
  {
     var username=$("#userName").val();
     var password=$(".passWord").val();
     $.post("login/loginIn",{userName:username,passWord:password},function(r)
     {
        if(r.code==1)    
        location.href="";
        else
        alert("帐号或密码错误！！！");
     },"json");
  });
  
    
});  
</script>
</body>
</html>